Update Payment In Status
The Update Payment In Status API enables either to complete or reject the inbound transactions.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
id Mandatory | String Unique ID of request Example – "1" |
method Mandatory | String Method Name Example – "VisaService.UpdatePaymentInStatus" |
params Mandatory | Object |
api Mandatory | Object |
credential Mandatory | String API credential provided by NetXD Example – "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=" |
signature Mandatory | String Signature of the digitally signed payload Example – "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==" |
payload Mandatory | Object |
COMPLETED | |
transaction Mandatory | Object |
id Mandatory | String Unique identifier of the transaction Example – "65e09de42bd32d0abe3e6de4" |
paymentInUpdatedStatusText Mandatory | String Current status of transaction Example – "COMPLETED" |
paymentInBeneCreditTime Mandatory | String Date and time of the beneficiary account was credited Example – "2024-02-29T15:08:00.000Z" |
paymentInComments Optional | String Whether transaction was successful or not. Here, the transaction was successful Example – "Success" |
paymentId Optional | String Unique payment ID helps to track the transaction Example – "164459778" |
REJECTED | |
transaction Mandatory | Object |
id Mandatory | String Unique identifier of the transaction Example – "65e09f332bd32d0abe3e6e3d" |
paymentInUpdatedStatusText Mandatory | String Current status of transaction Example – "REJECTED" |
paymentInUpdatedAction Mandatory | String Reason code provided by VISA for rejecting the transaction. Example – "AC01" |
paymentInComments Optional | String Whether transaction was successful or not. Here, the transaction was rejected Example – "Need correct A/C No." |
paymentId Optional | String Unique payment ID helps to track the transaction Example – "164459783" |
- cURL
- C#
- Go
- NodeJs
ccurl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"id":"1","method":"VisaService.UpdatePaymentInStatus","params":{"api":{"credential":"Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5","signature":"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="},"payload":{"transaction":{"id":"65e09de42bd32d0abe3e6de4","paymentInUpdatedStatusText":"COMPLETED","paymentInBeneCreditTime":"2024-02-29T15:08:00.000Z","paymentInComments":"Success"},"paymentId":"164459778"}}}{"id":"1","method":"VisaService.UpdatePaymentInStatus","params":{"api":{"credential":"Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5","signature":"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="},"payload":{"transaction":{"id":"65e09f332bd32d0abe3e6e3d","paymentInUpdatedStatusText":"REJECTED","paymentInUpdatedAction":"AC01","paymentInBeneCreditTime":"1999-12-31T18:30:00.000Z","paymentInComments":"Need correct A/C No."},"paymentId":"164459783"}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"" + "\n" +
@"{
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""method"": ""VisaService.UpdatePaymentInStatus"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""credential"": ""Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5"",
" + "\n" +
@" ""signature"": ""MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""transaction"": {
" + "\n" +
@" ""id"": ""65e09de42bd32d0abe3e6de4"",
" + "\n" +
@" ""paymentInUpdatedStatusText"": ""COMPLETED"",
" + "\n" +
@" ""paymentInBeneCreditTime"": ""2024-02-29T15:08:00.000Z"",
" + "\n" +
@" ""paymentInComments"": ""Success""
" + "\n" +
@" },
" + "\n" +
@" ""paymentId"": ""164459778""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}
" + "\n" +
@"" + "\n" +
@"{
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""method"": ""VisaService.UpdatePaymentInStatus"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""credential"": ""Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5"",
" + "\n" +
@" ""signature"": ""MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""transaction"": {
" + "\n" +
@" ""id"": ""65e09f332bd32d0abe3e6e3d"",
" + "\n" +
@" ""paymentInUpdatedStatusText"": ""REJECTED"",
" + "\n" +
@" ""paymentInUpdatedAction"": ""AC01"",
" + "\n" +
@" ""paymentInBeneCreditTime"": ""1999-12-31T18:30:00.000Z"",
" + "\n" +
@" ""paymentInComments"": ""Need correct A/C No.""
" + "\n" +
@" },
" + "\n" +
@" ""paymentId"": ""164459783""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`
{`+"
"+`
"id": "1",`+"
"+`
"method": "VisaService.UpdatePaymentInStatus",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",`+"
"+`
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"transaction": {`+"
"+`
"id": "65e09de42bd32d0abe3e6de4",`+"
"+`
"paymentInUpdatedStatusText": "COMPLETED",`+"
"+`
"paymentInBeneCreditTime": "2024-02-29T15:08:00.000Z",`+"
"+`
"paymentInComments": "Success"`+"
"+`
},`+"
"+`
"paymentId": "164459778"`+"
"+`
}`+"
"+`
}`+"
"+`
}`+"
"+`
{`+"
"+`
"id": "1",`+"
"+`
"method": "VisaService.UpdatePaymentInStatus",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",`+"
"+`
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"transaction": {`+"
"+`
"id": "65e09f332bd32d0abe3e6e3d",`+"
"+`
"paymentInUpdatedStatusText": "REJECTED",`+"
"+`
"paymentInUpdatedAction": "AC01",`+"
"+`
"paymentInBeneCreditTime": "1999-12-31T18:30:00.000Z",`+"
"+`
"paymentInComments": "Need correct A/C No."`+"
"+`
},`+"
"+`
"paymentId": "164459783"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = "\n{\r\n \"id\": \"1\",\r\n \"method\": \"VisaService.UpdatePaymentInStatus\",\r\n \"params\": {\r\n \"api\": {\r\n \"credential\": \"Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5\",\r\n \"signature\": \"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==\"\r\n },\r\n \"payload\": {\r\n \"transaction\": {\r\n \"id\": \"65e09de42bd32d0abe3e6de4\",\r\n \"paymentInUpdatedStatusText\": \"COMPLETED\",\r\n \"paymentInBeneCreditTime\": \"2024-02-29T15:08:00.000Z\",\r\n \"paymentInComments\": \"Success\"\r\n },\r\n \"paymentId\": \"164459778\"\r\n }\r\n }\r\n}\r\n\n{\r\n \"id\": \"1\",\r\n \"method\": \"VisaService.UpdatePaymentInStatus\",\r\n \"params\": {\r\n \"api\": {\r\n \"credential\": \"Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5\",\r\n \"signature\": \"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==\"\r\n },\r\n \"payload\": {\r\n \"transaction\": {\r\n \"id\": \"65e09f332bd32d0abe3e6e3d\",\r\n \"paymentInUpdatedStatusText\": \"REJECTED\",\r\n \"paymentInUpdatedAction\": \"AC01\",\r\n \"paymentInBeneCreditTime\": \"1999-12-31T18:30:00.000Z\",\r\n \"paymentInComments\": \"Need correct A/C No.\"\r\n },\r\n \"paymentId\": \"164459783\"\r\n }\r\n }\r\n}";
req.write(postData);
req.end();
Body
//Request body for "COMPLETED" status
{
"id": "1",
"method": "VisaService.UpdatePaymentInStatus",
"params": {
"api": {
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"transaction": {
"id": "65e09de42bd32d0abe3e6de4",
"paymentInUpdatedStatusText": "COMPLETED",
"paymentInBeneCreditTime": "2024-02-29T15:08:00.000Z",
"paymentInComments": "Success"
},
"paymentId": "164459778"
}
}
}
//Request body for "REJECTED" status
{
"id": "1",
"method": "VisaService.UpdatePaymentInStatus",
"params": {
"api": {
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"transaction": {
"id": "65e09f332bd32d0abe3e6e3d",
"paymentInUpdatedStatusText": "REJECTED",
"paymentInUpdatedAction": "AC01",
"paymentInComments": "Need correct A/C No."
},
"paymentId": "164459783"
}
}
}
Response: 201
Response Parameters
Parameter | Description |
---|---|
COMPLETED | |
jsonrpc | String JSON RPC VERSION Example – "2.0" |
result | Object |
message | String Confirmation message shows that the transaction to the creditor was successfully completed Example – "Confirmation of Beneficiary credit successful." |
id | String Unique identifier of the request Example – "1" |
REJECTED | |
jsonrpc | String JSON RPC VERSION Example – "2.0" |
result | Object |
message | String Confirmation message shows that the transaction to the creditor was rejected Example – "Payment Reject successful." |
id | String Unique identifier of the request Example – "1" |
//Response body for "COMPLETED" status
{
"jsonrpc": "2.0",
"result": {
"message": " Confirmation of Beneficiary credit successful."
},
"id": "1"
}
//Response body for "REJECTED" status
{
"jsonrpc": "2.0",
"result": {
"message": " Payment Reject successful."
},
"id": "1"
}